import * as constants from '../constants/login'

const INITIAL_STATE = {
    login: false
}

export const loginReducer = (state = INITIAL_STATE, action) => {
    switch (action.type) {
        case constants.LOG_IN:
            return {
                ...state,
                login: true
            };
        case constants.LOG_OUT:
            return {
                ...state,
                login: false
            };
        default:
            return state;
    }
}